//
// Created by WangPeng on 24-8-16.
//

#ifndef RTSP_H264_SERVER_ABSTRACT_INTERFACE_H
#define RTSP_H264_SERVER_ABSTRACT_INTERFACE_H

#include <cstdio>
#include <string>
#include <fstream>

class CUdpSocket;
struct CRtpProtocol;
class CAbstractInterface
{
public:
    explicit CAbstractInterface(std::string file_name) : file_name_(std::move(file_name)){}
    virtual ~CAbstractInterface() = default;
    virtual long get_frame_data(char *&frame, long size) = 0;
    virtual void play(CUdpSocket* udp_socket, CRtpProtocol* rtp_protocol) = 0;
protected:
    std::string file_name_{};
    std::ifstream ifs_{};
};

#endif //RTSP_H264_SERVER_ABSTRACT_INTERFACE_H
